class Solution:
    def twoSum(self, numbers: list, target: int) -> list:
        i, j = 0, len(numbers) - 1
        while numbers[i] + numbers[j] != target:
            if numbers[i] + numbers[j] > target:
                j -= 1
            else:
                i += 1
        return [i + 1, j + 1]


a = Solution()
print(a.twoSum(numbers=[2, 7, 11, 15], target=9))
